package com.ruoyi.project.system.domain;

import com.ruoyi.project.system.domain.vo.ProductVo;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

@Data
@NoArgsConstructor
public class UserCustomized {

    private Long userId;

    private String nickName;

    private String userName;

    private BigDecimal totalIncome;

    private BigDecimal transferred;

    private String grade;

    private String parent;

    private Integer num;

    private Integer size;

    private List<ProductVo> supps;

    private boolean loadDetails = false;

    public UserCustomized(SysUser user) {
        this.userId = user.getUserId();
        this.userName = user.getUserName();
        this.nickName = user.getNickName();
        this.parent = user.getParent();
        this.grade = user.getGrade();
        this.supps = new ArrayList<>();
    }

    public UserCustomized(SysUser user, BigDecimal totalIncome, BigDecimal transferred) {
        this.userId = user.getUserId();
        this.userName = user.getUserName();
        this.nickName = user.getNickName();
        this.parent = user.getParent();
        this.grade = user.getGrade();
        this.totalIncome = totalIncome;
        this.transferred = transferred;
    }
}
